
#import "Notification.h"


@implementation Notification
-(instancetype)initWith:(NSDictionary *)dict{
    self = [super init];
    if (self != nil) {
        NSDictionary *Data = dict[@"Data"];
        [self setRead:[Data[@"Read"]boolValue]];
        [self setID:Data[@"ID"]];
        [self setContent:Data[@"Content"]];
        [self setType:Data[@"Type"]];
        [self setSourceID:Data[@"SourceID"]];
        [self setCreateTime:[Data[@"CreateTime"] integerValue]];
        [self setTargetID:Data[@"TargetID"]];
        NSDictionary *User = dict[@"User"];
        [self setName:User[@"Name"]];
        [self setGender:[User[@"Gender"] integerValue]];
        [self setAvatar:User[@"Avatar"]];
    }
    return self;
}
@end
